package game.ui.controls
{
	import com.greensock.*;
	import flash.events.*;
	import flash.geom.*;
	import game.ui.events.*;
	
	public class RxScrollBar extends RxUIElement
	{
		private var m_thumb:RxButtonBase;
		private var m_decrementButton:RxButtonBase;
		private var m_incrementButton:RxButtonBase;
		private var m_track:RxUIElement;
		private var m_autoScrollDir:int;
		private var m_thumbMoving:Boolean = false;
		private var m_isVertical:Boolean;
		private var m_scrollPosition:int;
		private var m_contentSize:int = 24;
		private var m_visibleSize:int = 24;
		private var m_stepSize:int;
		private var m_lastMousePos:int;
		private var m_currentTween:TweenLite;
		private var m_thumbSize:int = 0;
		private var m_trackRect:Rectangle;
		private var m_focus:RxUIElement = null;
		private var m_pageScrolling:Boolean = false;
		private var m_autoHideButtons:Boolean = false;
		private var m_dataGrid:RxDataGrid = null;
		private static const SNAP_DURATION:Number = 0.2;
		private static const AUTO_SCROLL_SPEED:int = 400;
		
		public function RxScrollBar(param1:Boolean = true, param2:int = 1, param3:Boolean = false, param4:RxButtonBase = null, param5:RxButtonBase = null, param6:RxButtonBase = null)
		{/*
			m_width = 24;
			m_height = 24;
			this.m_isVertical = param1;
			this.m_stepSize = param2;
			this.m_autoHideButtons = param3;
			this.m_trackRect = new Rectangle();
			if (param4)
			{
				this.m_decrementButton = param4;
				this.m_decrementButton.addEventListener(MouseEvent.MOUSE_DOWN, this.OnDecrementButtonDown, false, 0, true);
				this.m_decrementButton.addEventListener(MouseEvent.ROLL_OVER, this.OnScrollButtonRollOver, false, 0, true);
				this.m_decrementButton.addEventListener(MouseEvent.ROLL_OUT, this.OnScrollButtonRollOut, false, 0, true);
				this.m_decrementButton.addEventListener(MouseEvent.CLICK, this.OnScrollButtonClick, false, 0, true);
				this.m_decrementButton.addEventListener(Event.RESIZE, this.LayoutChildren, false, 0, true);
				addChild(this.m_decrementButton);
			}
			if (param5)
			{
				this.m_incrementButton = param5;
				this.m_incrementButton.addEventListener(MouseEvent.MOUSE_DOWN, this.OnIncrementButtonDown, false, 0, true);
				this.m_incrementButton.addEventListener(MouseEvent.ROLL_OVER, this.OnScrollButtonRollOver, false, 0, true);
				this.m_incrementButton.addEventListener(MouseEvent.ROLL_OUT, this.OnScrollButtonRollOut, false, 0, true);
				this.m_incrementButton.addEventListener(MouseEvent.CLICK, this.OnScrollButtonClick, false, 0, true);
				this.m_incrementButton.addEventListener(Event.RESIZE, this.LayoutChildren, false, 0, true);
				addChild(this.m_incrementButton);
			}
			if (param6)
			{
				this.m_thumb = param6;
				this.m_thumb.addEventListener(MouseEvent.MOUSE_DOWN, this.OnThumbDown, false, 0, true);
				this.m_thumb.addEventListener(MouseEvent.ROLL_OVER, this.OnScrollButtonRollOver, false, 0, true);
				this.m_thumb.addEventListener(MouseEvent.ROLL_OUT, this.OnScrollButtonRollOut, false, 0, true);
				this.m_thumb.addEventListener(MouseEvent.CLICK, this.OnScrollButtonClick, false, 0, true);
				this.m_thumb.addEventListener(Event.RESIZE, this.LayoutChildren, false, 0, true);
				addChild(this.m_thumb);
			}*/
			InvalidateSize();
		}
	}
}